/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

package br.com.jr2tecnologia.model;

import br.com.jr2tecnologia.model.entity.BankAccount;
import br.com.jr2tecnologia.model.entity.Company;
import br.com.jr2tecnologia.model.entity.Credit;
import java.util.List;
import javax.annotation.PostConstruct;
import javax.ejb.Local;

/**
 *
 * @author ronildo
 */

@Local
public interface BankAccountPersistenceLocal {

    @PostConstruct
    void initialize();

    void recalculateQuantitySmsBuyed(BankAccount bankAccount);

    void recalculateBalance(BankAccount bankAccount);

    BankAccount findById(BankAccount bankAccount);

    BankAccount findByName(String name);

    List<BankAccount> listBankAccount(BankAccount bankAccount);

    List<BankAccount> listAllBankAccount();

    void persist(BankAccount bankAccount);

    void remove(BankAccount bankAccount);

    void update(BankAccount bankAccount);

    List<Credit> listCreditOfBank(BankAccount bankAccount);

    List<Credit> listCreditsOfCompany(Company company);
    
    List<Credit> listAllCredit();

    public List<BankAccount> listBankAccountsOfCompany(Company company);
}
